local skel = fk.CreateSkill{
  name = "ftk_response",
}
local U = require "packages/poker-games/utility"
Fk:loadTranslationTable{
  ["ftk_response"] = "响应",
  [":ftk_response"] = "FTK",
}
---@type ViewAsSkillSpec
local ftk = {
  interaction = function (self, player)
    UI.ComboBox{ choices = {} }
  end,
  card_filter = Util.TrueFunc,
  view_as = function (self, player, cards)
    if #cards == 0 then return end
    ---@diagnostic disable-next-line: undefined-field
    local to_cards = self.to_cards ---@type integer[]
    local result = U.canResponse(cards, to_cards)
    if result.can_response then
      local _list = U.splitByString(result.from_type)
      local c = Fk:cloneCard("ftk__" .. _list[1])
      self.interaction = self.interaction or {}
      self.interaction.data = "ftk__" .. _list[1]
      return c
    end
  end
}
skel:addEffect("viewas", ftk)
return skel